Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-developer is "event-search-dev">

it allows to retrieve the geolocated events in a given temporal range (day, week or month). The results can be possibly filtered to be within a specified distance from a GPS position, or within a rectangular area or inside a WKT described geographic area.

Inputs

A JSON with these parameters:
selection string
“ <lat>; <lng>” with a GPS position or “ <lat1>; <lng1>; <lat2>; <lng2>” for a rectangular area or “wkt: <WKT_string>” or “geo: <geoid>” for a geographic area described as Well Known Text
range string
time range for the events to be retrieved, it can be ‘day’ for the events of the day of the request, ‘week’ for the events in the next 7 days or ‘month’ for the events in the next 30 days (if omitted ‘day’ is assumed).
maxdistance number
maximum distance from the GPS position of the services to be retrieved, expressed in Km (0.1 is used if parameter is missing) if it is equal to “inside” it searches for services with a WKT geometry that contains the specified GPS position (e.g a park)
maxresults number
maximum number of results to be returned (if parameter is missing 100 is assumed), if it is 0 all results are returned
geometry boolean
true/false, if true it returns a “hasGeometry” property for each service stating if the service has a complex WKT geometries (linestring, polygon) associated with it (if parameter is missing “false” is assumed)

Outputs

the results format is a GeoJSON “FeatureCollection” with the matching events. For each “Feature” a set of properties is provided.d

Details

The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON. If the values are not present in the input JSON, these are read by those in the configuration. If they are not present in either part, an error is generated for the necessary parameters.